package com.inspinia.base.dao.db;

/**
 * 数据源的类型
 * Created by veblen on 2017/1/10.
 */
public enum DataSources {
    //主库
    MASTER("MASTER"),
    //数据库消息
    DB_MESSAGE("DB_MESSAGE"),
    //单点登录服务器
    OOS("OOS");
    private final String name;

    DataSources(String name) {
        this.name = name;
    }

    public static DataSources nameOf(String name){
        for (DataSources datasource:values()) {
            if (datasource.name.equals(name)){
                return datasource;
            }
        }
        return null;
    }
}
